<?php
namespace Admin\Controller;
use Common\Controller\AdminbaseController;
/*资金动态控制器模板*/
class CapitalDynamicController extends AdminbaseController{
	
	function _initialize() {
		parent::_initialize();
	}
	
	function index(){
		$this->_list();
		$this->display();
	}
	
	
	///////////////////////////////////////////////////////////////////////////
		private function _list() {
	    $fields = array('user_uniq_id'=>array("field" =>"user_uniq_id","operator" =>"like"));
	    $where_and = $this ->get_where_ands(IS_POST, $fields);
	    $where = join(' and ', $where_and);
	    $count = M("CapitalDynamic") ->where($where) ->count(1);
	
	    $page = $this ->page($count, 20);
	    $this ->assign("Page", $page ->show('Admin'));
	    $this ->assign("current_page", $page ->GetCurrentPage());
	    $list = M("CapitalDynamic") ->where($where)->order('create_time desc') ->limit($page ->firstRow.','.$page ->listRows) ->select();
	    $this ->assign('list', $list);
	}
}